-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix MariaDB fetching of default table character-set #6425
Conversation
SQL example:
|
From MariaDB-10.10.1, where uca1400 was added, the information_schema.COLLATION_CHARACTER_SET_APPLICABILITY was extended to have FULL_COLLATION_NAME which corresponds to the information_schema.TABLES.TABLE_COLLATION value. Executable comment syntax is used to limited to the applicable versions. To preserve compatibility with older MariaDB versions, and MySQL versions where the previous COLLATION_NAME was the match is left as a JOIN critieria. In new MariaDB versions this won't result in an extra row match. Closes: #6361
ON ccsa.COLLATION_NAME = t.TABLE_COLLATION | ||
ON /*M!101001 ccsa.FULL_COLLATION_NAME = t.TABLE_COLLATION OR */ | ||
ccsa.COLLATION_NAME = t.TABLE_COLLATION |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to avoid version conditionals in SQL. We have our platform class hierarchy for this purpose.
I'll accept this change as a hotfix for MariaDB 11.4 on the 3.8.x branch. Can you work on a PR for 3.9.x that moves the SQL statement to AbstractMySQLPlatform
and that introduces a new platform class for MariaDB 10.10 which overrides the generated SQL?
<!-- Fill in the relevant information below to help triage your pull request. --> | Q | A |------------- | ----------- | Type | improvement | Fixed issues | N/A <!-- use #NUM format to reference an issue --> #### Summary Improve the CI to cover newer versions of MariaDB 11.4+. Also cover the quay.io/mariadb-foundation/mariadb-devel images from https://quay.io/repository/mariadb-foundation/mariadb-devel?tab=tags where they are updated with completed, reviewed and tested changes in the MariaDB server main branch. These are completed features/bug fixes in the next server version. As such this is a good thing to test before the users get the final product. ref: https://mariadb.org/new-service-quay-io-mariadb-foundation-mariadb-devel/ The test failures here are fixed by #6425. <!-- Provide a summary of your change. -->
* 4.0.x: CI: Update MariaDB versions (#6426) CI MariaDB: add 11.4, remove 11.0 (#6432) Display warnings when running PHPUnit in CI (#6431) Fix typo in the portability documentation (#6430) Fix MariaDB fetching of default table character-set (#6361) (#6425) Fix the portability documentation (#6429) Update tests/Platforms/AbstractPlatformTestCase.php Update tests/Platforms/AbstractPlatformTestCase.php add test Fix: Skip type comparison if disableTypeComments is true
* 4.1.x: (25 commits) Simplify signature of fetchTableOptionsByTable Add MariaDb1010Platform for fetchTableOptionsByTable PHPUnit 10.5.21 (doctrine#6447) Move schema split for SQLite CREATE INDEX only (doctrine#6352) PHPStan 1.11.5 (doctrine#6446) Default to distinct union queries (doctrine#6439) Revert "Merge pull request doctrine#6413 from achterin/bugfix/foreign_key_name_change_detection" Add `QueryBuilder` support for `UNION` clause (doctrine#6369) CI: Update MariaDB versions (doctrine#6426) CI MariaDB: add 11.4, remove 11.0 (doctrine#6432) Display warnings when running PHPUnit in CI (doctrine#6431) Fix typo in the portability documentation (doctrine#6430) Fix MariaDB fetching of default table character-set (doctrine#6361) (doctrine#6425) Fix the portability documentation (doctrine#6429) Update tests/Platforms/AbstractPlatformTestCase.php Update tests/Platforms/AbstractPlatformTestCase.php add test Fix: Skip type comparison if disableTypeComments is true Remove redundant variable (doctrine#6326) Fix test names to reflect their actual purpose ...
Summary
From MariaDB-10.10.1, where uca1400 was added, the information_schema.COLLATION_CHARACTER_SET_APPLICABILITY was extended to have FULL_COLLATION_NAME which corresponds to the information_schema.TABLES.TABLE_COLLATION value.
Executable comment syntax is used to limited to the applicable versions.
To preserve compatibility with older MariaDB versions, and MySQL versions where the previous COLLATION_NAME was the match is left as a JOIN criteria. In new MariaDB versions this won't result in an extra row match.
Closes: #6361
The lack of this fix did case the CI test to fail with a MariaDB-11.0+ container:
With this fix all version of MySQL and MariaDB (even those new ones soon to be in a different PR) will pass like: https://github.com/grooverdan/dbal/actions/runs/9412110648/job/25926481038